package com.eastfair.venueservice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.boot.service.SuperService;
import com.eastfair.venueservice.dto.ServiceInventoryQuery;
import com.eastfair.venueservice.entity.ServiceInventory;
import com.eastfair.venueservice.vo.ServiceInventoryVO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 业务接口
 * 服务库存
 * </p>
 *
 * @author linan
 * @date 2022-07-14
 */
public interface ServiceInventoryService extends SuperService<ServiceInventory> {

    /**
     * 增加库存
     * @param inventoryCode
     * @param inNum
     */
    void addInventory(String inventoryCode, BigDecimal inNum);

    /**
     * 减少库存
     * @param inventoryCode
     * @param outNum
     */
    void minusInventory(String inventoryCode,BigDecimal outNum);

    /**
     * 查询库存列表
     * @param serviceInventoryQuery
     * @return
     */
    Page<ServiceInventoryVO> queryInventoryList(PageParams<ServiceInventoryQuery> serviceInventoryQuery);

    /**
     * 查询库存列表
     * @param  serviceInventoryQuery serviceInventoryQuery
     * @return Map<String,Object>
     */
    Map<String,Object> queryInventoryStatistics(ServiceInventoryQuery serviceInventoryQuery);

    /**
     * 查询需要预警的服务规格项
     * @param exhibitionManageId
     * @return
     */
    List<ServiceInventoryVO> queryWaringItem(Long exhibitionManageId);
}
